<?php

use think\facade\Route;

$domain = ['Access-Control-Allow-Headers' => 'Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-CSRF-TOKEN, X-Requested-With, token, sign'];

//云牧场-商品分类
Route::group('pastureProductCate', function () {
    Route::get('/index', 'pastureProductCate/index');
});

//云牧场-商品
Route::group('pastureProduct', function () {
    Route::get('/getList', 'pastureProduct/getList');
    Route::get('/search', 'pastureProduct/search')->middleware('verify');
    Route::get('/details', 'pastureProduct/details');
    Route::get('/getSpecData', 'pastureProduct/getSpecData');
    Route::get('/getSpecValue', 'pastureProduct/getSpecValue');
    Route::post('/submit', 'pastureProduct/submit')->middleware('verify');
    Route::post('/emptySearch', 'pastureProduct/emptySearch')->middleware('verify');
});

//云牧场-购物车
Route::group('pastureCart', function () {
    Route::get('/index', 'pastureCart/index');
    Route::post('/add', 'pastureCart/add');
    Route::post('/edit', 'pastureCart/edit');
    Route::post('/submit', 'pastureCart/submit');
})->middleware('verify');

//云牧场-订单相关
Route::group('pastureOrder', function () {
    Route::get('/index', 'pastureOrder/index');
    Route::get('/payment', 'pastureOrder/payment');
    Route::get('/details', 'pastureOrder/details');
    Route::get('/getList', 'pastureOrder/getList');
    Route::post('/submit', 'pastureOrder/submit');
    Route::post('/confirmPayment', 'pastureOrder/confirmPayment');
    Route::post('/edit', 'pastureOrder/edit');

    //退款退货
    Route::get('/refundFront', 'pastureOrder/refundFront');
    Route::post('/refundSave', 'pastureOrder/refundSave');
    Route::get('/getMyRefundOrder', 'pastureOrder/getMyRefundOrder');
    Route::get('/getMyRefundOrderInfo/:id', 'pastureOrder/getMyRefundOrderInfo');
    //Route::get('/getExpress', 'pastureOrder/getExpress');
    Route::post('/editRefundOrder', 'pastureOrder/editRefundOrder');
    Route::get('/orderExp', 'pastureOrder/orderExp');
    Route::get('/expInfo', 'pastureOrder/expInfo');
})->middleware('verify');

//云牧场-提现相关
Route::group('pastureDraw', function () {
    Route::get('/rule', 'pastureDraw/rule');
    Route::get('/index', 'pastureDraw/index');
    Route::post('/save', 'pastureDraw/save');
})->middleware('verify');

//云牧场-转账相关
Route::group('pastureTransfer', function () {
    Route::get('/rule', 'pastureTransfer/rule');
    Route::get('/index', 'pastureTransfer/index');
    Route::get('/verify', 'pastureTransfer/verify');
    Route::post('/save', 'pastureTransfer/save');
})->middleware('verify');


